package com.frank.easyexcel.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author 小石潭记
 * @date 2021/7/5 10:09
 * @Description: ${todo}
 */
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_area")
public class TArea {

    @Id
    @GeneratedValue
    @ExcelProperty(index = 0, value = "城市ID")
    private int id;

    @ExcelProperty(index = 1, value = "城市名称")
    private String areaName;

    @ExcelProperty(index = 2, value = "父级城市ID")
    private int parentId;

    @ExcelProperty(index = 3, value = "父级城市名称")
    private String parentName;
    @ExcelIgnore
    private String level;
}
